package common.utils;

import net.sourceforge.tess4j.ITesseract;
import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;

/**
 * Created by Administrator on 2017/8/4.
 */
public class OCRUtils {
    public static  String ocr(File imgFile) throws TesseractException {
        ITesseract instance = new Tesseract();
        instance.setDatapath("e://tessdata");
        return instance.doOCR(imgFile);
    }
}
